<?php
function getParamsList($paramName) {
		
	if(!isset($_REQUEST[$paramName]) )
		return array();

	$query  = explode('&', $_SERVER['QUERY_STRING']);
	$params = array();

        foreach( $query as $param ) {
        	list($name, $value) = explode('=', $param);
                if (urldecode($name) == $paramName)
                	$params[] = urldecode($value);
        }

	return $params;
}

function columnExists($columnsList, $name) {

	if (array_search($name, $columnsList) === FALSE) {
        	return false;
        } else {
                return true;
        }

}

function printBitzerTD($value, $fontStartTag, $fontEndTag, $isBitzer) {

	if (!$isBitzer) {
		$encodedValue = htmlentities($value);
		echo '<td>',$fontStartTag,$encodedValue,$fontEndTag,'</td>';
	} else {
		echo '<td>',$value,'</td>';
	}
}

function printBitzerTH($name, $isBitzer) {

	echo '<th data-bitzer-field="'.$name.'">';
	if (!$isBitzer) 
		echo $name;
	echo '</th>';
}


function nameValuePairToSimpleArray($array){
    		$my_array=array();
    		while(list($name,$value)=each($array)){
        		$my_array[$value['name']]=$value['value'];
    		}
    		return $my_array;
	} 



?>
